<%-- 
    Document   : sukiencontent
    Created on : Oct 6, 2011, 1:14:43 PM
    Author     : Administrator
--%>

<%@page import="java.text.DecimalFormat"%>
<%@page import="java.util.List"%>
<%@page import="hibernate.pojo.Sanpham"%>
<%@page import="org.hibernate.HibernateException"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<div class="BoxDealHot">
    <div class="BoxDealHotTop">
        <div class="BoxDealHotBottom ViDeal">
            <div class="Title">
                <h2 class="Num2"> Sự Kiện</h2>
            </div>								
            <div class="ViDealContent">								
                <ul class="EventList">
<%
    try
    {
        DecimalFormat df = new DecimalFormat("###,###");
        List<Sanpham> arrSanPham = (List<Sanpham>) request.getAttribute("DanhSachDealSuKien");
        if(arrSanPham!=null)
        {
            for(int i=0; i<arrSanPham.size(); i++)
            {
                Sanpham sanpham = arrSanPham.get(i);
%>
                    <li>
                        <a href="dealdetailcontroller?action=viewdealdetail&amp;state=close&amp;maSanPham=<%=sanpham.getMaSanPham()%>" class="Left"><img src="<%=sanpham.getAnhDaiDien()%>" class="" alt="[<%=sanpham.getTieuDeSanPham()%>]" title="Click để xem chi tiết" width="160" height="100" /></a>
                        <div class="EventContent">
                            <p><a href="dealdetailcontroller?action=viewdealdetail&amp;state=close&amp;maSanPham=<%=sanpham.getMaSanPham()%>" style="text-decoration: none; color: #333;"><%=sanpham.getTenSanPham()%></a> </p>
                            <p> <strong>Trị giá:</strong> <span class="GiaTien"><%=df.format(sanpham.getTriGia())%><span class="c cr" title=""></span>đ</span> </p>
                            <p> <a class="DaHet" href=""> Hết hạn </a>  </p>
                        </div>
                    </li>		
<%
            }
        }
    }
    catch(HibernateException ex)
    {
        out.println(ex);
    }
%>                    	
                </ul>
                <div class="PagingWrapper">
                    <div class="PageControl">
                        <ul class="PageList">
                            <span class="PagingFirstPageLnk">&laquo; Trước</span>
                            <span class="PagingNextPageLnk">Tiếp theo &raquo;</span>
                        </ul>
                    </div>
                </div>				 
            </div>								                                
        </div>
    </div>
</div>
